(global.webpackJsonp = global.webpackJsonp || []).push([ [ "wjyk_recycle/pages/share-money/share-money" ], {
    "22cb": function(t, e, n) {
        n.r(e);
        var o, r = n("c0bf"), a = n("5833");
        for (o in a) "default" !== o && function(t) {
            n.d(e, t, function() {
                return a[t];
            });
        }(o);
        n("b0fe");
        var s = n("f0c5"), r = Object(s.a)(a.default, r.b, r.c, !1, null, null, null, !1, r.a, void 0);
        e.default = r.exports;
    },
    3954: function(t, e, n) {},
    5833: function(t, e, n) {
        n.r(e);
        var o, r = n("ab4e"), a = n.n(r);
        for (o in r) "default" !== o && function(t) {
            n.d(e, t, function() {
                return r[t];
            });
        }(o);
        e.default = a.a;
    },
    ab4e: function(t, a, s) {
        (function(o) {
            Object.defineProperty(a, "__esModule", {
                value: !0
            }), a.default = void 0;
            var t, r = (t = s("4795")) && t.__esModule ? t : {
                default: t
            };
            function u(t, e, n, o, r, a, s) {
                try {
                    var i = t[a](s), u = i.value;
                } catch (t) {
                    return n(t), 0;
                }
                i.done ? e(u) : Promise.resolve(u).then(o, r);
            }
            function e(i) {
                return function() {
                    var t = this, s = arguments;
                    return new Promise(function(e, n) {
                        var o = i.apply(t, s);
                        function r(t) {
                            u(o, e, n, r, a, "next", t);
                        }
                        function a(t) {
                            u(o, e, n, r, a, "throw", t);
                        }
                        r(void 0);
                    });
                };
            }
            var n = {
                data: function() {
                    return {
                        pic_url: this.$imgUrl,
                        avatar: this.$imgUrl + "/head-img@3x.png",
                        userInfo: {},
                        cash_limit: "",
                        cash_type: "",
                        posterShow: !1,
                        posterImg: ""
                    };
                },
                onShow: function() {
                    this.user(), this.brokerageSet();
                },
                methods: {
                    openPost: function() {
                        var t = this;
                        console.log("============", this.userInfo.qrcode), o.showLoading({
                            title: "加载中...",
                            mask: !0
                        }), this.posterShow = !0;
                        var e = {
                            pic_url: this.posterImg,
                            icon: this.userInfo.qrcode
                        };
                        setTimeout(function() {
                            console.log(t.$refs.poster), t.$refs.poster.drawPoster(e);
                        }, 200);
                    },
                    closePost: function() {
                        this.posterShow = !1;
                    },
                    open: function() {
                        var t = this;
                        this.userInfo.brokerage_wait <= 0 ? this.$sun.toast("暂无佣金提现！") : this.userInfo.brokerage_wait < this.cash_limit ? this.$sun.toast("提现额度小于" + this.cash_limit) : 1 == this.cash_type ? (console.log("提现到支付宝"), 
                        o.navigateTo({
                            url: "../withdraw-bank-commission/withdraw-bank-commission?money=" + this.userInfo.brokerage_wait
                        })) : this.$refs.pop.show({
                            title: "申请提现",
                            titleStyle: "font-size:28rpx;color:#5F5D5D;",
                            style: "background-color:#fff;width:500rpx;border-radius:10rpx;",
                            btns: [ {
                                text: "确认",
                                style: "font-size:28rpx;font-weight:bold;color:#07C160",
                                onTap: function() {
                                    console.log("agree"), t.brokerageCashwait(), t.close();
                                }
                            }, {
                                text: "取消",
                                style: "font-size:28rpx;color:#5F5D5D",
                                onTap: function() {
                                    console.log("refuse"), t.close();
                                }
                            } ]
                        });
                    },
                    close: function() {
                        this.$refs.pop.close();
                    },
                    openCode: function() {
                        this.$refs.popCode.show({
                            style: "width:600rpx;border-radius:10rpx;"
                        });
                    },
                    closeCode: function() {
                        this.$refs.popCode.close();
                    },
                    withdrawRecord: function() {
                        o.navigateTo({
                            url: "../withdrawals-record/withdrawals-record"
                        });
                    },
                    withdraw: function() {
                        o.navigateTo({
                            url: "../commission/commission"
                        });
                    },
                    team: function() {
                        o.navigateTo({
                            url: "../team/team"
                        });
                    },
                    brokerageCashwait: function() {
                        var n = this;
                        return e(r.default.mark(function t() {
                            var e;
                            return r.default.wrap(function(t) {
                                for (;;) switch (t.prev = t.next) {
                                  case 0:
                                    return t.next = 2, n.$http({
                                        url: n.$api.brokerageCashwait,
                                        data: {
                                            uid: o.getStorageSync("uid"),
                                            brokerage_wait: n.userInfo.brokerage_wait,
                                            cash_type: 2
                                        }
                                    });

                                  case 2:
                                    if (0 == (e = t.sent).errno) return t.next = 6, n.$sun.toast(e.message);
                                    t.next = 8;
                                    break;

                                  case 6:
                                    return t.next = 8, n.$sun.delay(.5, function() {
                                        n.user();
                                    });

                                  case 8:
                                    console.log("佣金提现申请", e);

                                  case 9:
                                  case "end":
                                    return t.stop();
                                }
                            }, t);
                        }))();
                    },
                    user: function() {
                        var n = this;
                        return e(r.default.mark(function t() {
                            var e;
                            return r.default.wrap(function(t) {
                                for (;;) switch (t.prev = t.next) {
                                  case 0:
                                    return t.next = 2, n.$http({
                                        url: n.$api.user,
                                        data: {
                                            uid: o.getStorageSync("uid")
                                        }
                                    });

                                  case 2:
                                    0 == (e = t.sent).errno && (n.userInfo = e.data), console.log("用户信息", e);

                                  case 5:
                                  case "end":
                                    return t.stop();
                                }
                            }, t);
                        }))();
                    },
                    brokerageSet: function() {
                        var n = this;
                        return e(r.default.mark(function t() {
                            var e;
                            return r.default.wrap(function(t) {
                                for (;;) switch (t.prev = t.next) {
                                  case 0:
                                    return t.next = 2, n.$http({
                                        url: n.$api.brokerageSet
                                    });

                                  case 2:
                                    0 == (e = t.sent).errno && (n.cash_limit = e.data.cash_limit, n.cash_type = e.data.cash_type, 
                                    n.posterImg = e.data.poster), console.log("佣金设置", e);

                                  case 5:
                                  case "end":
                                    return t.stop();
                                }
                            }, t);
                        }))();
                    }
                }
            };
            a.default = n;
        }).call(this, s("543d").default);
    },
    b0fe: function(t, e, n) {
        var o = n("3954");
        n.n(o).a;
    },
    c0bf: function(t, e, n) {
        function o() {
            this.$createElement, this._self._c;
        }
        var r = {
            sunuiPopup: function() {
                return n.e("components/sunui-popup/sunui-popup").then(n.bind(null, "c2fe"));
            }
        }, a = [];
        n.d(e, "b", function() {
            return o;
        }), n.d(e, "c", function() {
            return a;
        }), n.d(e, "a", function() {
            return r;
        });
    },
    fa46: function(t, e, n) {
        (function(t) {
            function e(t) {
                return t && t.__esModule ? t : {
                    default: t
                };
            }
            n("8163"), e(n("66fd")), t(e(n("22cb")).default);
        }).call(this, n("543d").createPage);
    }
}, [ [ "fa46", "common/runtime", "common/vendor" ] ] ]);